package nave.android.game;
import java.awt.Rectangle;
import java.awt.geom.Point2D;
import java.awt.geom.Point2D;

	public  class Portal extends GameObject 
	{
		
		
		boolean existe = true;
		Rectangle portalRectangle;
		
		public  Portal (Asset imagem, Point2D posicao, Point2D tamanho)
		{
			super (imagem,posicao,tamanho);
			portalRectangle = new Rectangle ((int)posicao.getX(), (int)posicao.getY(), (int)tamanho.getX(), (int)tamanho.getY());
			
		}
		
		public void Update(Rectangle playerRect) {
			
			
			if(portalRectangle.intersects(playerRect))
			{
				if(player.temchave())
				{
					existe = false;
				}
			}				
		}
		public void Draw() {
		}
		
	}

